using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DAL;


namespace BO.Admin
{
    public class Category_Helper
    {
        enum Category_ID { Wedding = 1, FashionBeauty, Lifestyle }
        public static DataTable Get(int Category_ID)
        {
            DataTable dt;
            using (MainDB db = new MainDB())
            {
                dt = db.StoredProcedures.Category_Get(Category_ID);
            }
            return dt;
        }
        public static void Category_Update(int Category_ID, string Category_Name, string Category_Icon, string Category_DisplayUrl)
        {
            using (MainDB db = new MainDB())
            {
                db.StoredProcedures.Category_Update(Category_ID, Category_Name, Category_Icon, Category_DisplayUrl);
            }
        }
        public static DataTable GetAll()
        {
            DataTable dt;
            using (MainDB db = new MainDB())
            {
                dt = db.StoredProcedures.Category_GetAll();
            }
            return dt;
        }
        public static void UpdateIcon(int Category_ID, string Category_Icon)
        {
            using (MainDB db = new MainDB())
            {
                db.StoredProcedures.Category_UpdateIcon(Category_ID, Category_Icon);
            }
        }
    }
}
